Reportes = function(){
		var configWindow = {
			edit: "ctgProductoEditarTop",
			form: "reportesForm"
		};
		return {
			reportePrueba: function (){
				Menu.openWindow(
									"reportes/generarReportePdf",
									{
										nombreReporte: "reportePrueba"
									}
								);
			},
			ventasPorPeriodo: function (){
					Menu.openWindow(
						"reportes/generarReportePdf",
						{
							nombreReporte: "ventasPeriodo",
							fecha1: Ext.getCmp("fecha1").getValue(),
							fecha2: Ext.getCmp("fecha2").getValue(),
							//fecha2: Ext.getCmp("fecha2").rawValue
						}
					);
				},
	    				
	    					
	    	
			init: function(config){
				var configToReturn = {};
				configToReturn.items = [];
				configToReturn.menu = AsiBotones.getBotones(AsiGen.getTipoUsuario(), AsiGen.getPantallaId());
				configToReturn.items.push({
					flex: 1,
					title: "REPORTES ALFINTE",
					autoScroll: true,
					xtype: "panel",
					layout: {
					    type: "vbox",
					    align : "center",
					    pack  : "start"
					},
					defaults: {width: 730, margins: "5 0 5 0"},
					items: [
						{
				        	xtype: "form",
							id: "reportesForm",
							flex: 1,
						    border: false,
						    autoScroll: true,
							layout: {
								type: "table",
								columns: 6,
								style : {
									width : "730px",
									"margin-top" : "5px",
									"margin-bottom" : "40px"
								},
								align : "center"
							},
							defaults: {
								width: 230,
								selectOnFocus: true,
								enforceMaxLength: true,
								maxLength: 200,
								typeAhead: true,
								minChars: 1,
								queryMode: "local",
								forceSelection: true,
								allowEnable: true,
								colspan: 2
							},
							items: [
					        	 {
									xtype: "label",
									text: "REPORTE DE PRUEBA",
									cls: "x-form-item label_header",
									colspan: 6,
									width: 736
								},
								
								
								
								
								/*{
										xtype: "button",
										iconCls: Asi.constants.icons.SHOPPIN_CAR,
										cls: "background",
										tooltip: "Reporte de prueba 1",
										text: "Reporte de prueba 1",
										handler : Reportes.reportePrueba
					        	},{
										xtype: "hidden"
								},{
										xtype: "button",
										iconCls: Asi.constants.icons.SHOPPIN_CAR,
										cls: "background",
										tooltip: "Reporte de prueba 2",
										text: "Reporte de prueba 2",
										handler : Reportes.reporteMio
								}*/
								{
									xtype: "hidden"
							    },
								    Ext.create('Ext.form.Panel', {
								        renderTo: Ext.getBody(),
								        width: 300,
								        bodyPadding: 10,
								        title: 'Reporte De Ventas Por Periodo',
								        align : "center",
								        items: [{
								            xtype: 'datefield',
								            anchor: '100%',
								            fieldLabel: 'fecha1',
								            id:"fecha1",
								            align : "center",
								            name: 'fecha1',
								            // The value matches the format; will be parsed and displayed using that format.
								            //format: 'm d Y',
								            //value: '2 4 1978'
								        },{
								            xtype: 'datefield',
								            anchor: '100%',
								            fieldLabel: 'fecha2',
								            name: 'fecha 2',
								            id:"fecha2",
								            // The value does not match the format, but does match an altFormat; will be parsed
								            // using the altFormat and displayed using the format.
								            //format: 'm d Y',
								            //altFormats: 'm,d,Y|m.d.Y',
								            //value: '2.4.1978'
								        },{
											xtype: "button",
											iconCls: Asi.constants.icons.SHOPPIN_CAR,
											cls: "background",
											text: "generar reporte",
											handler : Reportes.ventasPorPeriodo
									}]
								    })
							
								

							]
				        }
					]
					
				});
				return configToReturn;
			}
		};
	}();